package com.glasses.primework;

import javax.faces.bean.ManagedBean;
import org.primefaces.model.chart.PieChartModel;

@ManagedBean
public class PieBean {
    private PieChartModel model;
    
    public PieBean() {
        model = new PieChartModel();
        model.set("Brand 1", 540);
        model.set("Brand 2", 325);
        model.set("Brand 3", 702);
        model.set("Brand 4", 421);
        
        /*
        model.setTitle("Simple Pie");
        model.setLegendPosition("w");
        */
        
        model.setTitle("Custom Pie");
        model.setLegendPosition("e");
        model.setFill(false);
        model.setShowDataLabels(true);
        model.setDiameter(150);
    }
    
    public PieChartModel getModel() {
        return model;
    }
}